<div class="h_left">
<link rel="stylesheet" href="/res/editor/css/editor.css" type="text/css">
<script  type="text/javascript" src="/res/editor/js/webeditor.js"></script>
<script src="/res/cartoon/js/cartoon.js" tppe="text/javascript"></script>
<?require_once('part_ctlist_top.phtml');?>
<?if($this->ret['data']):?>
<div class="album-content">
<?foreach ($this->ret['data'] as $row):?>
	<div class="myalbum" >
				<ul>
					<li class="title"><a href="http://www.<?=DOMAIN?><?= self::_makeURL('index','index','view_photo',array('cid'=>$row['id'],'ctid'=>$row['cartoon_id']))?>"><?= $row['chapter_title']?></a></li>
					<li class="count">共<span><?= $row['pic_num']?></span>张图片</li>
					<li class="create-time"><span>创建于：</span><?= date("Y-m-d",$row['add_time'])?></li>
					<?if(self::$is_self):?>
					<li class="tools">
					<a href="javascript:void(0);" onclick="modifyChapter(<?= $row['id']?>,'<?= self::_makeURL($this->app,'index','edit_chapter')?>')">编辑</a>
					<span class="spacing-line">|</span>
						<a href="javascript:void(0);" onclick="delChapter(<?= $row['id']?>,'<?= self::_makeURL($this->app,'index','remove_chapter')?>')">删除</a>
					<span class="spacing-line">|</span>
					<a href="<?=$this->_makeURL($this->app, $this->controller, 'batch_photo_form', array('chapter_id'=>$row['id']))?>">上传图片</a>
					</li>
					<?else:?>
					<li class="tools"><span class="spacing-line">&nbsp;</span></li>
					<?endif;?>
				</ul>
			</div><!-- myalbum-->
			<div id='panel_<?= $row['id']?>' style='display:none;'>
			<ul class="create-album-form"> 
							<li><span>章节名：</span><input id='cname_<?=$row['id']?>' name="cname" type="text" maxlength=11  value="<?= $row['chapter_title']?>" /></li> 
							<li><span>详细描述：</span><textarea id='info_<?= $row['id']?>' name="info" cols="" rows=""><?= $row['info']?></textarea></li> 
							<input type=hidden name=base id='base_<?= $row['id']?>' value=<?= $row['id']?> />
							</li> 
			</ul> 			
			</div>
<?endforeach;?>			
</div>
<?=$this->ret['pages']?>
<?else:?>
 <i:info type="friendly" xmlns:i="178">该漫画还没有章节</i:info>
<?endif;?>
</div>
<div id='addChapter' style='display:none;'>
章节名称：<input type="text" name='chapter_title' id="chapter_title" maxlength=100 class="blog_input" style="width: 150px;"/>
		<input type="hidden" value="<?=$this->ret['cartoon_info']['id']?>"  id = "_cartoon_id" />
		<br /><br />
章节排序：<input type="text" value="0" name="chapter_ordernum" id="chapter_ordernum" /><br />
章节介绍：<input type="hidden" id="s_desc" name="s_desc" />
	<div id="postcontent" style="padding-left:60px">
		<textarea id="simple_desc" name="simple_desc" ></textarea>
	</div>
	<script type="text/javascript">
	var e_fontsize = true;
	var e_face = true;
	var e_media = false;
	var e_bold = true;
	var e_InsertOrderedList = true;
	var e_italic = true;
	var e_underline = true;
	var e_JustifyLeft = true;
	var e_JustifyCenter = true;
	var e_JustifyRight = true;
	var e_font = true;
	var e_color = true;
	var e_backcolor = false;
	var e_img = true;
	var e_link = true;
	var e_uploadimg = false;
	var e_piclink = false;
	var e_CommentFace = false;
	var e_face = false;
	var e_toolbarbg = true;
	s_content_editor = new webEditor("s_content_editor" , 	$("postcontent"),300,200);
	s_content_editor.init('');
</script>
<br />
</div>